From 3e40146c04e3a6522b579261343b3ef555872ec1 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 31 Aug 2009 16:37:50 +0200 Subject: [PATCH] Fix order of cairo clip setting when drawing text We need to set the window clip region before applying the gc clip region, otherwise we will reset the gc clip region. Fixes bug 593595 --- gdk/gdkgc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gdk/gdkgc.c b/gdk/gdkgc.c index 13d9c8dab1..e721ff5655 100644 --- a/gdk/gdkgc.c +++ b/gdk/gdkgc.c @@ -1486,6 +1486,10 @@ _gdk_gc_update_context (GdkGC *gc, return; cairo_reset_clip (cr); + /* The reset above resets the window clip rect, so we want to re-set that */ + if (target_drawable && GDK_DRAWABLE_GET_CLASS (target_drawable)->set_cairo_clip) + GDK_DRAWABLE_GET_CLASS (target_drawable)->set_cairo_clip (target_drawable, cr); + if (priv->clip_region) { cairo_save (cr); @@ -1501,9 +1505,6 @@ _gdk_gc_update_context (GdkGC *gc, cairo_clip (cr); } - /* The reset above resets the window clip rect, so we want to re-set that */ - if (target_drawable && GDK_DRAWABLE_GET_CLASS (target_drawable)->set_cairo_clip) - GDK_DRAWABLE_GET_CLASS (target_drawable)->set_cairo_clip (target_drawable, cr); } -- 2.30.2